package com.salelogistics.sale.controller;

import com.salelogistics.common.core.utils.poi.ExcelUtil;
import com.salelogistics.common.core.web.controller.BaseController;
import com.salelogistics.common.core.web.domain.AjaxResult;
import com.salelogistics.common.core.web.page.TableDataInfo;
import com.salelogistics.common.log.annotation.Log;
import com.salelogistics.common.log.enums.BusinessType;
import com.salelogistics.common.security.annotation.RequiresPermissions;
import com.salelogistics.sale.domain.SmsDeliveryPlanDetails;
import com.salelogistics.sale.domain.dto.DeliveryPlanDetailsDto;
import com.salelogistics.sale.service.ISmsBatchPlanService;
import com.salelogistics.sale.service.ISmsDeliveryPlanDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author: Hu Kangying
 * @date: 2023/7/24 10:42
 * @description:
 */
@RestController
@RequestMapping("/batchDetails")
public class SmsBatchPlanDetailsController extends BaseController {
    @Autowired
    private ISmsBatchPlanService batchPlanService;

    /**
     * 查询月配送计划详细货物列表
     */
    @GetMapping("/{batchId}")
    public TableDataInfo getListByBatchId(@PathVariable("batchId") Long batchId) {
        List<DeliveryPlanDetailsDto> list = batchPlanService.queryBatchPlanDetailsWithPlanId(batchId);
        return getDataTable(list);
    }


}
